#!/bin/sh

# Watson IoT Client test

# Check for application
[ ! -x ./examples/wiot/wiot ] && echo -e "\n\nWatson IoT MQTT Client doesn't exist" && exit 1

def_args="-T -C 2000"

# Run

./examples/wiot/wiot $def_args $1
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nWatson IoT MQTT Client failed! TLS=On, QoS=0" && exit 1

echo -e "\n\nWatson IoT MQTT Client Tests Passed"

exit 0
